﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using TRPOP.Common;
using TRPOP.Config;

namespace TRPOP.CMS.Plugin
{
    /// <summary>
    /// 权限Key
    /// </summary>
    public class PermissionKeys
    {

        public enum PermissionEnum
        {

            NullKey,                        //Null

            #region 关于节点的Key
            Node_AllControl,                //全部操作
            Node_Select,                    //查看
            Node_Add,                       //添加
            Node_Save,                      //编辑
            Node_Del,                       //删除
            #endregion

            #region 关于信息管理的Key
            Content_AllControl,             //全部操作
            Content_Select,                 //查看
            Content_Add,                    //添加
            Content_Save,                   //编辑
            Content_Del,                    //删除
            #endregion

            #region 关于系统管理的操作Key
            SystemManage_All,               //全部
            SystemManage_Cache,             //缓存
            SystemManage_SysParam,          //系统设置
            SystemManage_User,              //用户
            SystemManage_ContentModel,      //内容模型
            SystemManage_PSN,               //PSN管理
            SystemManage_Plugin,            //插件管理
            SystemManage_UploadFile,        //附件设置
            SystemManage_TemplateVars,      //模板变量
            SystemManage_KeysReplace,       //关键字替换
            SystemManage_Other,             //其他
            #endregion

            #region
            Plugin_All                     //所有插件
            #endregion
        }
        /// <summary>
        /// 获取页面权限码关键字
        /// </summary>
        /// <param name="enumKey"></param>
        /// <returns></returns>
        public static string  GetPermissionKey(PermissionEnum enumKey)
        {
            return Enum.GetName(typeof(PermissionEnum), enumKey);
        }
        

    }
}
